package cn.hellochaos.generator.service;

import cn.hellochaos.generator.entity.CaipuSummary;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
* <p>
* 简要介绍 服务类
* </p>
*
* @author test
* @since 2021-01-23
*/
public interface CaipuSummaryService {


    /**
     * 根据id查询CaipuSummary
     *
     * @param cookbookId 需要查询的CaipuSummary的id
     * @return 返回对应id的CaipuSummary对象
     * @author test
     * @since 2021-01-23
     */
    CaipuSummary getCaipuSummaryByCookbookId(int cookbookId);

    /**
    * 分页查询CaipuSummary
    *
    * @param page     当前页数
    * @param pageSize 页的大小
    * @param factor  搜索关键词
    * @return 返回mybatis-plus的Page对象,其中records字段为符合条件的查询结果
    * @author test
    * @since 2021-01-23
    */
    Page<CaipuSummary> listCaipuSummarysByPage(int page, int pageSize, String factor);

    /**
    * 根据id查询CaipuSummary
    *
    * @param id 需要查询的CaipuSummary的id
    * @return 返回对应id的CaipuSummary对象
    * @author test
    * @since 2021-01-23
    */
    CaipuSummary getCaipuSummaryById(int id);

    /**
    * 插入CaipuSummary
    *
    * @param caipuSummary 需要插入的CaipuSummary对象
    * @return 返回插入成功之后CaipuSummary对象的id
    * @author test
    * @since 2021-01-23
    */
    int insertCaipuSummary(CaipuSummary caipuSummary);

    /**
    * 根据id删除CaipuSummary
    *
    * @param id 需要删除的CaipuSummary对象的id
    * @return 返回被删除的CaipuSummary对象的id
    * @author test
    * @since 2021-01-23
    */
    int deleteCaipuSummaryById(int id);

    /**
    * 根据id更新CaipuSummary
    *
    * @param caipuSummary 需要更新的CaipuSummary对象
    * @return 返回被更新的CaipuSummary对象的id
    * @author test
    * @since 2021-01-23
    */
    int updateCaipuSummary(CaipuSummary caipuSummary);

}
